package com.media.system.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Knife4j接口文档配置
 * 
 * @author Claude
 * @since 2024-01-20
 */
@Configuration
public class Knife4jConfig {

    /**
     * OpenAPI配置
     */
    @Bean
    public OpenAPI openAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("家庭媒体管理系统API")
                        .description("家庭媒体管理系统后端接口文档")
                        .version("v1.0.0")
                        .contact(new Contact()
                                .name("Claude")
                                .email("claude@family-media.com")
                                .url("https://github.com/family-media/family-media-system"))
                        .license(new License()
                                .name("MIT License")
                                .url("https://opensource.org/licenses/MIT")));
    }
}